<template>
    <div class="connetion" @click="to_connection" v-if="!$store.state.user.is_superuser">
        联系我们
    </div>
    <div>

    </div>
</template>

<script>
import { useRouter } from 'vue-router';
import { useStore } from 'vuex';
export default {
    name: "ConnectionView",
    setup() {
        const router = useRouter();
        const store = useStore();
        const to_connection = () => {
            if (!store.state.user.is_login) {
                router.push({
                    name: 'login',
                })
            } else {
                router.push({
                    name: 'contact',
                    params: {
                        userid: 7
                    }
                })
            }
        }
        return {
            to_connection
        }
    }
}
</script>

<style scoped>
.connetion {
    height: 100px;
    width: 30px;
    float: left;
    position: fixed;
    top: 200px;
    background-color: rgb(119,123,250);
    text-align: center;
    cursor: pointer;
    user-select: none;
}
</style>